#define  _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<map>
#include<string>
#include<stack>

using namespace std;
const int N = 1e5 + 3;
int n,x;
int sum[N];
int res;

bool check(int dis)
{
	for (int i = dis; i < n; ++i)
		if (sum[i] - sum[i - dis] < 2 * x)
			return false;
	return true;
}
int main()
{
	cin >> n >> x;

	for(int i = 1;i < n;++i)
	{
		int val;
		cin >> val;
		sum[i] = sum[i - 1] + val;
	}
	
	int left = 0, right = N;
	while (left < right)
	{
		int mid = left + (right - left)/2;
		if(check(mid))
			right = mid;
		else 
			left = mid+1;

	}

	cout << left << "\n";
	return 0;
}